package com.vdong.trade.trading.common.foundation;

import com.vdong.trade.trading.common.function.OperationFunction;
import org.lamb.framework.common.util.BeanPlasticityUtill;

/**
 * @description: 基础业务层
 * @author: Mr.WangGang
 * @create: 2018-11-29 上午 10:05
 **/
public class FoundationCRUDOperation {
    public <T extends Object, DO extends FoundationMO, E extends OperationFunction<DO, X>, X> X operation(T t, Class<DO> clazz, E e) {
        DO domain = BeanPlasticityUtill.copy(clazz, t);
        domain.timeSet();
        return e.execute(domain);
    }
}
